package ouyangye.student;

public class StudentM extends Student {
    private String name;
    private String id;
    private boolean isCET6Passed;
    private int paperCount;

    public StudentM(){

    }

    public StudentM(String name,String id,boolean isCET6Passed,int paperCount){
        this.name=name;
        this.id=id;
        this.isCET6Passed=isCET6Passed;
        this.paperCount=paperCount;
    }

    @Override
    public void setName(String name) {
        this.name = name;
    }

    @Override
    public void setId(String id) {
        this.id = id;
    }

    public void setCET6(boolean passed) {
        isCET6Passed = passed;
    }

    public void setPapers(int count) {
        paperCount = count;
    }

    @Override
    public boolean isExcellent() {
        return isCET6Passed&&paperCount>=2;
    }

    @Override
    public void printInfo() {
        System.out.println("硕士生姓名："+name+",学号："+id+",六级是否通过："+isCET6Passed+",论文数："+paperCount);
    }
}
